from rest_framework import serializers
from apps.spit.models import Spit

class SpitSerializer(serializers.ModelSerializer):

    class Meta:
        model = Spit
        fields = '__all__'
        extra_kwargs = {
            'publishtime': {
                'read_only': True
            },
            'visits': {
                'read_only': True
            },
            'thumbup': {
                'read_only': True
            },
            'comment': {
                'read_only': True
            },
            'collected': {
                'read_only': True
            },
            'hasthumbup': {
                'read_only': True
            },
        }